<template>
    <div class="swiper">
    <div class="swiper-wrapper">
        <div class="swiper-slide" style="background-color:red">Slide 1</div>
        <div class="swiper-slide" style="background-color:green">Slide 2</div>
        <div class="swiper-slide" style="background-color:yellow">Slide 3</div>
    </div>
    
    <!-- 如果需要导航按钮 -->
    <!-- <div class="swiper-button-prev"></div>
    <div class="swiper-button-next"></div> -->

</div>
</template>

<script>
import Swiper from 'swiper';
import 'swiper/swiper-bundle.min.css';
export default {
    mounted(){
        var swiper = new Swiper('.swiper', {
            autoplay: true,
            speed:1000,
            loop: true, // 循环模式选项
            // navigation: {
            //     nextEl: '.swiper-button-next',
            //     prevEl: '.swiper-button-prev',
            // },
        }); 
    }
}
</script>

<style scoped>
.swiper {
    width: 464px;
    height: 300px;
}  
</style>